Merge "Return the page_id in list=langbacklinks as an int"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 25 Feb 2019 02:45:42 +0000 (02:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 25 Feb 2019 02:45:42 +0000 (02:45 +0000)
1  2 
includes/api/ApiQueryLangBacklinks.php

@@@ -67,7 -67,7 +67,7 @@@ class ApiQueryLangBacklinks extends Api
                        $op = $params['dir'] == 'descending' ? '<' : '>';
                        $prefix = $db->addQuotes( $cont[0] );
                        $title = $db->addQuotes( $cont[1] );
 -                      $from = intval( $cont[2] );
 +                      $from = (int)$cont[2];
                        $this->addWhere(
                                "ll_lang $op $prefix OR " .
                                "(ll_lang = $prefix AND " .
                        if ( !is_null( $resultPageSet ) ) {
                                $pages[] = Title::newFromRow( $row );
                        } else {
-                               $entry = [ 'pageid' => $row->page_id ];
+                               $entry = [ 'pageid' => (int)$row->page_id ];
  
                                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                                ApiQueryBase::addTitleInfo( $entry, $title );